package com.hemerasolutions.v2trainer.service;

import java.util.ArrayList;
import java.util.List;

public class ExceptionService extends RuntimeException {

private static final long serialVersionUID = 1L;
	
	private int code = 0;
	
	private List<String> messages;

	public ExceptionService (String message){
		super(message);
		this.messages.add(message);
	}

	public ExceptionService (String message,int code){
		super(message);
		this.code = code;
		this.messages.add(message);
	}

	
	public ExceptionService (Throwable cause){
		super(cause);
	}

	public ExceptionService (){
		super();
		messages = new ArrayList<String>();
	}

	public  ExceptionService (String message,Throwable cause){
		super(message,cause);
		this.messages.add(message);
	}	
	
	public  ExceptionService (String message,Throwable cause,int code){
		super(message,cause);
		this.code = code;
		this.messages.add(message);

	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public List<String> getMessages() {
		return messages;
	}

	public void setMessages(List<String> messages) {
		this.messages = messages;
	}
	
	
	
}
